<template>
    <view class="static">
        <view class="static-label">{{ labelName }}</view>
        <u-text
            block
            size="40rpx"
            bold
            align="center"
            :text="mode=='price'?valuePrice(value):value"
            lineHeight="56rpx"
            margin="20rpx 0 0 0"
            :color="color"
        ></u-text>
    </view>
</template>

<script>
    import { toThousandFilter } from "@/untils"
    export default {
        name: "index",
        props: {
            color: {
                type: String,
                default: "#000000"
            },
            labelName: {
                type: String,
                default: ""
            },
            value: {
                default: "0"
            },
            mode: {
                type: String,
                default: null
            }
        },
        methods: {
            valuePrice(val) {
                return toThousandFilter(val)
            }
        }
    }
</script>

<style lang="scss" scoped>
    .static {
        margin-bottom: 90rpx;
        .static-label {
            font-size: 24rpx;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #888888;
            text-align: center;
        }
        .static-num {
            margin-top: 20rpx;
            font-size: 40rpx;
            font-weight: bold;
            font-family: PingFang-SC-Bold, PingFang-SC;
            color: #000000;
            line-height: 56rpx;
            text-align: center;
        }
    }
</style>
